<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<title>驴友网-首页</title>

<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Css/style.css">
<link rel="stylesheet" type="text/css" href="Css/bootstrap.css">
<script type="text/javascript" src="Js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="Js/bootstrap.js"></script>
<script type="text/javascript"
	src="http://webapi.amap.com/maps?v=1.3&key=f2b99d347f5a3626f6d52d7a334bb6b1"></script>
<script type="text/javascript"
	src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
</head>

<body style="background:#EEEFF1;">
	<!-- header start-->
	<div class="container-fluid " style="background:#333;height:37px;">
		<div class="row ">
			<div class="col-md-2"></div>
			<div class="col-md-8 text-right" style="padding:8px;">
				<c:choose>
					<c:when test="${sessionScope.flag.equals('ok')}">
						<span class="label label-danger">你好,${sessionScope.username}</span>|<a
							href="<c:url value='/logoutServlet'/>?value=2"
							class="label label-primary">注销</a>
					</c:when>
					<c:otherwise>
						<a href="login.jsp"><span class="label label-info">登录</span></a>
						<em>|</em>
						<a href="register.jsp"><span class="label label-info">注册</span></a>
						<em>|</em>
						<a href="find1.html"><span class="label label-info">忘记密码</span></a>
					</c:otherwise>
				</c:choose>
			</div>
			<div class="col-md-2"></div>
		</div>
	</div>

	<div class="container-fluid " style="background:#328555;height:137px;">
		<div class="row ">
			<div class="col-md-2"></div>
			<div class="col-md-8">

				<img src="image/logo.png" style="margin:30px;" />

			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
	<!-- header end-->

	<!-- navigation start -->
	<div class="container-fluid " style="background:#333;height:62px;">
		<div class="row">
			<div class="col-md-2"></div>
			<div class="col-md-8">

				<ul class="nav nav-pills nav-justified" style="padding:10px;">
					<li role="presentation" class="span"><a href="#">首页</a></li>
					<li role="presentation" class="span"><a href="notification.html">咨询</a></li>
					<li role="presentation" class="span"><a href="<c:url value='/blogServlet'/>">论坛</a></li>
					<li role="presentation" class="span"><a href="#">广播</a></li>
					<li role="presentation" class="span"><a href="#">分组</a></li>
					<li role="presentation" class="span"><a href="<c:url value='/userInfoServlet'/>">个人中心</a></li>
				</ul>

			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
	<!-- navigation ending -->
	<div class="container">
		<div class="row" >
			<div id="myPageTop">
				<table>
					<tr>
						<td><label>按关键字搜索：</label></td>
						<td class="column2"><label>左击获取经纬度：</label></td>
					</tr>
					<tr>
						<td><input type="text" placeholder="请输入关键字进行搜索" id="tipinput">
						</td>
						<td class="column2"><input type="text" readonly="true"
							id="lnglat"></td>
					</tr>
				</table>
			</div>
		</div>

		<div class="row">
			<div class="col-md-5" id="container" style="height:400px;"></div>

		</div>

	</div>
</body>

<script type="text/javascript">
	var map = new AMap.Map("container", {
		resizeEnable : true
	});
	//为地图注册click事件获取鼠标点击出的经纬度坐标
	var clickEventListener = map.on('click', function(e) {
		document.getElementById("lnglat").value = e.lnglat.getLng() + ',' + e.lnglat.getLat()
	});
	var auto = new AMap.Autocomplete({
		input : "tipinput"
	});
	AMap.event.addListener(auto, "select", select); //注册监听，当选中某条记录时会触发
	function select(e) {
		if (e.poi && e.poi.location) {
			map.setZoom(15);
			map.setCenter(e.poi.location);
		}
	}
</script>

</html>